from django import template

register = template.Library()

@register.filter
def get(value, args):
    try:
        ret = value[args]
    except IndexError:
        ret = None
    return ret